var idCardUitl = {
    getBirthday: function(idCard) {
        return idCard.substring(6, 10) + '-' + idCard.substring(10, 12) + '-' + idCard.substring(12, 14);
    },
    getAge: function(idCard) {
        let date = new Date();
        let age = date.getFullYear() - idCard.substring(6, 10) - 1;
        let month = date.getMonth() + 1;
        if (idCard.substring(10, 12) < month || idCard.substring(10, 12) == month && idCard.substring(10, 12) <= date.getDate()) {
            age++;
        }
        return age;
    },
    getGender: function(idCard) {
        return idCard.substr(16, 1) % 2 == 1 ? 1 : 0;
    },
};